﻿using FurStudy.Application;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurStudy.Web.Entry.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class PersonController : ControllerBase
    {
        public readonly IBusinessService<int> _businessService;
        public PersonController(IBusinessService<int> businessService)
        {
            _businessService = businessService;
        }

        [HttpGet]
        public IActionResult Get(int id)
        {
            var person = _businessService.Get(id);
            return new JsonResult(person);
        }
    }
}
